ποΈGitΠ―ΡΠ°ποΈ
.github/copilot-instructions.md f5e5fb6da63ee85e64dbbe19a519a5a3deccd408 (f5e5fb6d) Text, 3.93 KB
Meshtastic Android β Copilot Instructions
β Full rules: T383838AGENTS.md is the source of truth. This file is a compact quick-reference for build
β commands and task naming. For architecture, conventions, and workflow details, consult T383838AGENTS.md
β and the T383838.skills/ playbooks listed at the bottom.
Build, Test & Lint
Requires: JDK 21, T383838ANDROID_HOME set, proto submodule initialized.
T282828
T8b949e# Bootstrap (run once per fresh clone)
git submodule update --init
Tff7b72[ -f local.properties Tff7b72] Tff7b72|| cp secrets.defaults.properties local.properties
T8b949e# Full local verification (formatting β lint β compile β tests)
./gradlew spotlessApply detekt assembleDebug Tffa657test allTests
T8b949e# Single module tests (KMP module)
./gradlew :core:data:allTests
T8b949e# Single module tests (Android-only module like :app)
./gradlew :androidApp:testFdroidDebugUnitTest
T8b949e# Cross-platform compilation check (no tests)
./gradlew kmpSmokeCompile
T8b949e# Flavor-specific lint
./gradlew lintFdroidDebug lintGoogleDebug
β Both T383838test AND T383838allTests are needed. T383838allTests covers KMP modules; T383838test covers pure-Android modules.
β Neither alone catches everything.
Gradle task naming (KMP vs Android-only)
KMP modules have different task names than pure-Android modules. Using the wrong name silently skips tests or fails resolution.
βββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββ
β Intent β KMP modules (`BT383838`Fdddcore:*`f`b, `BT383838`Fdddfeature:*`f`b) β Android-only (`BT383838`Fdddapp`f`b, `BT383838`Fdddcore:api`f`b, `BT383838`Fdddcore:barcode`f`b) β
βββββββββββββββββΌββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€
β Run tests β T383838:module:allTests β T383838:module:testFdroidDebugUnitTest β
β Detekt β T383838:module:detekt (lifecycle task) β T383838:module:detekt β
β Compile check β T383838:module:compileKotlinJvm β T383838:module:compileFdroidDebugKotlin β
βββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββ
Common mistakes:
β’ β T383838:core:network:detektMain β does not exist in KMP; variants are T383838detektJvmMain, T383838detektMetadataCommonMain, etc. Use T383838:core:network:detekt instead.
β’ β T383838:feature:connections:testDebugUnitTest β ambiguous in KMP modules. Use T383838:feature:connections:allTests.
β’ β T383838:feature:connections:compileFdroidDebugKotlin β wrong for KMP. Use T383838:feature:connections:compileKotlinJvm or T383838kmpSmokeCompile.
Quick Reference
β’ Architecture: KMP project (Android, Desktop, iOS). Business logic in T383838commonMain; platform shells (T383838androidApp/, T383838desktopApp/) wire DI and host UI. See T383838AGENTS.md and T383838.skills/kmp-architecture/.
β’ Flavors: T383838fdroid (OSS) / T383838google (Maps + DataDog). Only one installable at a time (different signing keys).
β’ Verify before push: Run T383838./gradlew spotlessApply detekt assembleDebug test allTests, then confirm CI with T383838gh pr checks <PR>.
β’ Strings: T383838stringResource(Res.string.key) β run T383838python3 scripts/sort-strings.py after adding strings.
β’ Icons: T383838MeshtasticIcons (from T383838core/ui/icon/), not T383838material.icons.Icons.
β’ Error handling: T383838safeCatching {} (not T383838runCatching {}) in coroutine code.
β’ Dispatchers: T383838org.meshtastic.core.common.util.ioDispatcher, not T383838Dispatchers.IO.
β’ Navigation: T383838MeshtasticNavDisplay + T383838NavigationBackHandler (not Android T383838BackHandler).
β’ Protos: T383838core/proto/ is a read-only git submodule. Never modify proto files.
β’ Branches: Must start with T383838feat/, T383838fix/, T383838chore/, T383838docs/, T383838build/, T383838ci/, T383838refactor/, T383838test/, T383838deps/, or a numeric spec prefix. Always branch off T383838origin/main.
Deeper Guidance
Consult T383838.skills/ for detailed playbooks:
β’ T383838.skills/project-overview/ β Full codebase map and bootstrap
β’ T383838.skills/kmp-architecture/ β Source-set rules, expect/actual
β’ T383838.skills/compose-ui/ β Adaptive UI, string resources
β’ T383838.skills/navigation-and-di/ β Nav 3 & Koin patterns
β’ T383838.skills/testing-ci/ β CI architecture, verification matrix
β’ T383838.skills/implement-feature/ β Feature development workflow
β’ T383838.skills/code-review/ β PR hygiene checklist
β’ T383838.skills/speckit/ β Spec Kit SDD workflow, slash commands, constitution
Served by rngit 1.5.2 - Generated in 0.03s